<template>

        <div class="title">
            <div class="goback" @click="handlerback"><img src="../../img/2b.png" alt="" class="asd"></div>
            <div class="tt"><slot></slot></div>
        </div>
</template>

<script>
export default {
    methods:{
       handlerback(){
            // this.$router.back()
            // 当用户点击back的时候，希望调用者来去决定做什么样的功能
            this.$emit("back")
        }
    }
}
</script>

<style lang="scss" scoped>
    .title{
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0 ;
    height: 44px;
    z-index: 2;
        transition: all .3s ease;
    background-color: #fff;
    color: #191a1b;
    .goback{
        height: 30px;
    position: absolute;
    top: 5px;
    left: 5px;
        .asd{
            width: 30px;
        }
    }
    .tt{
            font-size: 17px;
    line-height: 44px;
    width: 100vw;
    text-align: center;
    }
        img{
            width: 50px;
            height: 50px;
        }
    }
</style>
